package cn.wizzer.app.crown.modules.models;

import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;
import org.nutz.integration.json4excel.annotation.J4EIgnore;

/**
 * 用户认证申请记录表
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Table("crown_view_point_order")
@TableIndexes({@Index(name = "INDEX_CT_AT", fields = {"ctAt"}, unique = false),
        @Index(name = "unique_no", fields = {"no"}, unique = true),
        @Index(name = "unique_userId_vpId", fields = {"userId", "vpId"}, unique = true)})
public class CrownViewPointOrder extends BaseModel {
    @Column
    @Name
    @Comment("ID")
    @J4EIgnore
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;

    @Column
    @Comment()
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String userId;

    @Column
    @Comment("观点ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String vpId;

    @Column
    @Comment("创建时间")
    @PrevInsert(els = @EL("$me.now()"))
    private Long ctAt;

    @Column
    @Comment("订单号")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String no;

}
